<script setup>
import {ref, onMounted,onBeforeUnmount,defineProps} from "vue"

const image1 = ref(null)
const image2 = ref(null)
const image3 = ref(null)
// const image4 = ref(null)

let num = 0
let inter = null

onMounted(()=>{
    inter = setInterval(()=>{
        if(num > 3){
            num = 0
        }
        num++
        switch(num){
            case 1:
                break
            case 2:
                break
            case 3:
                break
            default:
                break
        }
    },3000)
})

//组件销毁之前
onBeforeUnmount(()=>{
    console.log('swiperMaster即将销毁')
    clearInterval(inter)
    inter = null
})
</script>

<template>
    <div></div>
</template>

<style scoped>

</style>